package com.lm.auth.handler;

import com.lm.common.security.handler.AbstractAuthenticationSuccessEventHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;

/**
 * 登录成功处理类
 *
 * @author lm
 * @date 2019/8/26 10:20
 */
@Component
public class ScmAuthenticationSuccessHandler extends AbstractAuthenticationSuccessEventHandler {

    private static final Logger logger = LoggerFactory.getLogger(ScmAuthenticationSuccessHandler.class);

    /**
     * 登录成功
     *
     * @param authentication
     */
    @Override
    public void handle(Authentication authentication) {
        logger.info("用户：{} 登录成功", authentication.getPrincipal());
    }

}
